import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity('t_area')
export class Area {

  @PrimaryGeneratedColumn({ unsigned: true, type: 'int' })
  id: number;

  @Column({ type: 'varchar', nullable: false, comment: '省名称' })
  province: string;

  @Column({ type: 'varchar', nullable: false, comment: '市名称' })
  city: string;

  @Column({ type: 'varchar', nullable: false, comment: '区名称' })
  area: string;

  isCurrent?: boolean; // 是否当前城市

  @CreateDateColumn({ name: 'created_at' })
  createdAt: Date;

}
